/*
 * @Author: 颜礼田 2564217790@qq.com
 * @Date: 2024-09-07 09:24:34
 * @LastEditors: MrDotYan 2564217790@qq.com
 * @LastEditTime: 2024-09-21 12:45:02
 * @FilePath: /webServer/src/config/config.local.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { MidwayConfig } from '@midwayjs/core';

export default {
  // use for cookie sign key, should change to your own and keep security
  koa: {
    port: 7001,
  },
  // redis 配置
  redis: {
    client: {
      port: 6379, // Redis port
      host: '127.0.0.1', // Redis host
      password: '',
      db: 0,
    },
  },
  // 数据库配置
  typeorm: {
    dataSource: {
      default: {
        type: 'mysql',
        host: '127.0.0.1',
        port: 3306,
        username: 'root',
        password: '123456',
        // password: '12345678',
        database: 'pig_db',
        synchronize: true,
        logging: true,
        entityPrefix: 'pig_',
        entities: [
          'model', // 特定目录
        ],
      },
    },
  },
} as MidwayConfig;
